<%--
  Created by IntelliJ IDEA.
  User: 陈振忠
  Date: 2016/7/27
  Time: 15:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>账户管理</title>
</head>
<body>
<p>
<div class="row">
    <form id="searchAccountForm">
        <div class="research_content_col col-xs-12">
            <div class="form-group col-xs-12 col-sm-3 researchInput">
                <label class="col-xs-3 col-sm-4 col-lg-3 control-label">中文名</label>
                <div class="col-xs-9 col-sm-8 col-lg-9 control-input">
                    <input class="form-control" placeholder="请输入中文名..."
                           type="text" name="Q_nameCn_like">
                </div>
            </div>
            <div class="form-group col-xs-12 col-sm-3 researchInput">
                <label class="col-xs-3 col-sm-4 col-lg-3 control-label">年龄</label>
                <div class="col-xs-9 col-sm-8 col-lg-9 control-input">
                    <input class="form-control" placeholder="请输入年龄..."
                           type="text" name="Q_age_=_short">
                </div>
            </div>
            <div class="form-group col-xs-12 col-sm-3 researchInput">
                <label class="col-xs-3 col-sm-4 col-lg-3 control-label">手机号码</label>
                <div class="col-xs-9 col-sm-8 col-lg-9 control-input">
                    <input class="form-control" placeholder="请输入手机号码..."
                           type="text" name="Q_cellPhone_like">
                </div>
            </div>
            <div class="form-group col-xs-6 col-sm-3 researchSelect">
                <label class="col-xs-3 col-sm-4 col-lg-3 control-label">性别</label>
                <div class="col-xs-9 col-sm-8 col-lg-9 control-select">
                    <select id="sex" name="Q_sex_=_short" class="select2" data-placeholder="请选择性别...">
                    </select>
                </div>
            </div>
            <div class="col-xs-6 col-sm-3 hide">
                <input id="accountDelStatus" value="0" type="text" name="Q_delStatus_=_Short">
            </div>
        </div>
    </form>
</div>
</p>
<div class="row">
    <div class="col-xs-12">
        <div class="row">
            <div class="col-xs-12 col-sm-12">
                <button type="button" class="btn btn-success btn-sm" onclick="accountManager.searchAccountInfo(false)">
                    <span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;搜索
                </button>
                <button id="clearAccountSearchFormBtn" type="button" class="btn btn-info btn-sm">
                    <span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
                </button>
            </div>
        </div>
        <p>
            <%--按钮部分结束--%>
        <div class="row">
            <div class="col-xs-12 col-sm-12" style="overflow: hidden;">
                <table id="grid-table"></table>
                <div id="grid-pager"></div>
            </div>
        </div>

        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="row">
                    <div class="col-xs-12 col-sm-12">
                        <p>
                            <!-- #section:elements.tab -->
                        <ul class="nav nav-tabs" id="myTab">
                            <li class="active">
                                <a data-toggle="tab" href="#project">
                                    <i class="green ace-icon fa fa-home bigger-120"></i>
                                    项目
                                </a>
                            </li>
                            <li>
                                <a data-toggle="tab" href="#dbInfo">
                                    <i class="green ace-icon fa fa-home bigger-120"></i>
                                    连接信息
                                </a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div id="project" class="tab-pane fade in active row">
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12">
                                        <button class="btn btn-primary btn-sm" type="button"
                                                onclick="accountManager.openWinProjectOrDb(true);">
                                            <span class="glyphicon glyphicon-plus"></span>
                                            新增
                                        </button>
                                        <button class="btn btn-danger btn-sm" type="button"
                                                onclick="accountManager.delProjectOrDb(true);">
                                            <span class="glyphicon glyphicon-trash"></span>
                                            删除
                                        </button>
                                    </div>
                                </div>
                                <p>
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12" style="overflow: hidden;">
                                        <table id="project-table"></table>
                                        <div id="project-pager"></div>
                                    </div>
                                </div>
                            </div>
                            <div id="dbInfo" class="tab-pane fade row">
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12">
                                        <button class="btn btn-primary btn-sm" type="button"
                                                onclick="accountManager.openWinProjectOrDb(false);">
                                            <span class="glyphicon glyphicon-plus"></span>
                                            新增
                                        </button>
                                        <button class="btn btn-danger btn-sm" type="button"
                                                onclick="accountManager.delProjectOrDb(false);">
                                            <span class="glyphicon glyphicon-trash"></span>
                                            删除
                                        </button>
                                    </div>
                                </div>
                                <P>
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12" style="overflow: hidden;">
                                        <table id="dbInfo-table"></table>
                                        <div id="dbInfo-pager"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div><!-- /.row -->
                </div>
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div>
</div>
<!-- 项目管理-新增删除弹窗begin -->
<div class="modal-content" id="accAddProjectModal" style="display: none;overflow-x: hidden">
    <div class="container" style="margin-top: 10px">
        <div class="row">
            <div class="col-sm-3 col-md-3">
                <div style="font-weight: bold">选中项目</div>
                <div style="margin-top: 25px;">
                    <button id="saveProjectAccBtn" type="button" class="btn btn-info btn-sm">
                        <span class="glyphicon glyphicon-ok"></span>&nbsp;&nbsp;保存
                    </button>
                    <button type="button" class="btn btn-danger btn-sm"
                            onclick="accountManager.removeProjectOrDb(true)">
                        <span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;移除
                    </button>
                    <button id="removeProjectAccBtn" type="button" class="btn btn-warning btn-sm">
                        <span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;取消
                    </button>
                </div>
                <div class="col-sm-12" style="margin-top:10px; margin-bottom:10px;width: 270px;padding-left: 0px;">
                    <select class="form-control" id="addedAccRelProjTable" name="accAddedJqgridTable"
                            multiple="multiple"
                            style="height:280px">
                    </select>
                </div>
            </div>
            <div class="col-sm-9 col-md-9" style="border-left:1px solid #f0f6e4;">
                <form class="form-horizontal" id="searchProjectForm" role="form">
                    <!-- #section:elements.form -->
                    <div class="form-group col-xs-6 col-sm-4 col-md-4">
                        <label class="col-sm-4 col-md-4  control-label" for="form-field-1"
                               style="font-size:13px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden;font-weight: bold">项目名
                        </label>

                        <div class="col-sm-8 col-md-8 " style="padding: 0px">
                            <input name="Q_name_like" id="project-form-1" type="text" style="width: 100%;">
                        </div>
                    </div>
                </form>
                <div class="col-sm-12" style="margin-top: 10px">
                    <button type="button" class="btn btn-success btn-sm"
                            onclick="accountManager.searchProjectOrDb(true);">
                        <span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
                    </button>
                    <button id="clearProjectSearchFormBtn" type="button" class="btn btn-info btn-sm">
                        <span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
                    </button>
                    <button type="button" class="btn btn-primary btn-sm"
                            onclick="accountManager.addProjectOrDbConnInfoToTable(true);">
                        <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加
                    </button>
                    <label>项目权限 </label>：
                    <select id="projectAutoValue">
                    </select>
                </div>

                <div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 785px;">
                    <table id="addProjectJqgridTable"></table>
                    <div id="addProjectJqPagerTable" style="height:45px;"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 项目管理-新增删除弹窗end -->
<!-- 数据库连接管理-新增弹窗begin -->
<div class="modal-content" id="accAddDbModal" style="display: none;overflow-x: hidden">
    <div class="container" style="margin-top: 10px">
        <div class="row">
            <div class="col-sm-3 col-md-3">
                <div style="font-weight: bold">选中数据库连接信息</div>
                <div style="margin-top: 25px;">
                    <button id="saveDbRelAccBtn" type="button" class="btn btn-info btn-sm">
                        <span class="glyphicon glyphicon-ok"></span>&nbsp;&nbsp;保存
                    </button>
                    <button type="button" class="btn btn-danger btn-sm"
                            onclick="accountManager.removeProjectOrDb(false)">
                        <span class="glyphicon glyphicon-trash"></span>&nbsp;&nbsp;移除
                    </button>
                    <button id="removeDbRelAccBtn" type="button" class="btn btn-warning btn-sm">
                        <span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;取消
                    </button>
                </div>
                <div class="col-sm-12" style="margin-top:10px; margin-bottom:10px;width: 270px;padding-left: 0px;">
                    <select class="form-control" id="addedAccRelDbTable" name="accAddedJqgridTable"
                            multiple="multiple"
                            style="height:280px">
                    </select>
                </div>
            </div>
            <div class="col-sm-9 col-md-9" style="border-left:1px solid #f0f6e4;">
                <form class="form-horizontal" id="searchDbConnInfoForm" role="form">
                    <!-- #section:elements.form -->
                    <div class="form-group col-xs-6 col-sm-4 col-md-4">
                        <label class="col-sm-4 col-md-4  control-label" for="form-field-1"
                               style="font-size:13px;text-align: center;padding: 0;padding-right: 5px;overflow: hidden;font-weight: bold">连接信息名
                        </label>

                        <div class="col-sm-8 col-md-8 " style="padding: 0px">
                            <input name="Q_name_like" id="form-field-1" type="text" style="width: 100%;">
                        </div>
                    </div>


                </form>
                <div class="col-sm-12" style="margin-top: 10px">
                    <button type="button" class="btn btn-success btn-sm"
                            onclick="accountManager.searchProjectOrDb(false);">
                        <span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;查询
                    </button>
                    <button id="clearDbConnInfoSearchFormBtn" type="button" class="btn btn-info btn-sm">
                        <span class="glyphicon glyphicon-remove"></span>&nbsp;&nbsp;清空查询
                    </button>
                    <button type="button" class="btn btn-primary btn-sm"
                            onclick="accountManager.addProjectOrDbConnInfoToTable(false);">
                        <span class="glyphicon glyphicon-plus"></span>&nbsp;&nbsp;添加
                    </button>
                </div>

                <div class="col-sm-12" style="margin-top:10px; margin-bottom:10px; width: 785px;">
                    <table id="addDbJqgridTable"></table>
                    <div id="addDbJqgridPager" style="height:45px;"></div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 数据库连接-新增弹窗end -->
<script type="text/javascript">
    var scripts = [null,
        path + '/admin/powerdb/designer/account/js/index.js',
        null];
    $('.page-content-area').ace_ajax('loadScripts', scripts, function () {

        $(document).ready(function () {
            accountManager.init();
        })
    });
</script>
</body>
</html>
